<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script src="${contextPath}/scripts/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
		<script src="${contextPath}/scripts/common.js" type="text/javascript"></script>
		<script src="${contextPath}/scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
		<link href="${contextPath}/styles/default.css" rel="stylesheet" type="text/css" />
</head>
<body>
     <table  width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CCCCCC">
    <tr>
      <td class="top-td-width-bg" width="16%">&nbsp;</td>
      <td class="top-td-width-bg" width="16%" height="43">序号</td>
      <td class="top-td-width-bg" width="33%">渠道简称</td>
      <td class="top-td-width-bg" width="51%">渠道全称</td>
    </tr>
    <s:iterator value="listBrand" status="i" id="u">
    
    <tr>
      <td class="down-center-td-width-bg"><label>
      <input type="checkbox" name="radio" id="radio" value="${i.count }" 
      	<s:iterator value="cked" id="c">
      		<s:if test="#u.id==#c">checked="checked"</s:if>
      	</s:iterator> 
      >
      <input type="hidden" id="mark${i.count }" value="${u.name }"/>
      <input type="hidden" id="name${i.count }" value="${u.fullName }"/>
      <input type="hidden" id="id${i.count }" value="${u.id }"/>
      </td>
      <td class="down-center-td-width-bg">${i.count }</td>
      <td class="down-center-td-width-bg">${u.name }</td>
      <td class="down-center-td-width-bg">${u.fullName }</td>
    </tr>
    
    </s:iterator> 
    <tr>
      <td colspan="4" align="center">    
      <a href="javascript:ok()"><img src="${contextPath}/images/xt_main_right_bottom_qd.png"/></a>    
          
      </td>
    </tr>
   
  </table>
 <script type="text/javascript">
 
function ok()
{ 
var temp=document.getElementsByName("radio");  
var x=null;
var bo=false;
var name='';
var brandId = '';
for (var i=0;i < temp.length;i++){ 
	if(temp[i].checked) 
	 {
		x=temp[i].value; 
		bo=true;
		name = document.getElementById("mark"+x).value+","+name;
		brandId = document.getElementById("id"+x).value+","+brandId;
	} 
}
	if(bo==true){
		name = name.substring(0,name.length-1);
		brandId = brandId.substring(0,brandId.length-1);
		window.opener.selectShopCallBack(name,brandId);
		window.close();
	}else{
		alert("请选择信息");	
	}

} 
</script>
 
</body>
</html>